package com.example.windowdemo.window.statewindow;

import android.view.KeyEvent;

import com.example.windowdemo.callback.WindowShowState;
import com.example.windowdemo.window.Window;

/**
 * @author: njb
 * @date: 2023/8/2 17:57
 * @desc:
 */
public class FullScreenWindowShowState implements WindowShowState {
    private final Window<?> window;

    public FullScreenWindowShowState(Window<?> window) {
        this.window = window;
    }

    @Override
    public void show() {
        window.setFullScreen(true);
        window.show();
    }

    @Override
    public void hide() {
        window.hide();
    }

    @Override
    public boolean dispatchKeyEvent(KeyEvent keyEvent) {
        // Handle key events for full-screen window
        return false;
    }
}
